﻿using System;
using Medianamik.Core;
using Medianamik.Core.Sugar;
using Medianamik.UI.Web.MVP.Presentation;
using Medianamik.UI.Web.MVP.View;

namespace Medianamik.UI.Web.Shop.Presentation.Presenters
{
    public class EditProductTypePresenter<TView>: NodeTypeEditModulePresenter<TView>
        where TView : class, INodeTypeEditModuleView
    {
        public EditProductTypePresenter(TView view)
            : base(view)
        {
        }
        
        public override string ReturnUrl
        {
	        get 
	        {
                return base.ReturnUrl ?? Pages.ProductTypeList.AddParam(DefaultParamNames.ParentNodeID, ParentTypeId);
	        }
        }

        public override Guid? ParentTypeId
        {
            get
            {
                return base.ParentTypeId ?? TypeIds.ProductBase;
            }
        }
    }
}